logs = '''

111.30.144.7 "POST /mock/login/?t=GET HTTP/1.1" 200

111.30.144.7 "Get /mock/users/?t=POST HTTP/1.1" 200

111.13.100.92 "Post /mock/login/ HTTP/1.1" 200

223.88.60.88 "GET /mock/users/?t=POST HTTP/1.1" 200

111.30.144.7 "GET /mock/users/ HTTP/1.1" 200

'''
requests = []


def config_data():
    database = logs.split("\n")
    for item in database:
        if len(item) > 1:
            requests.append(item)


def statistics_request_type():
    post = 'POST'
    get = 'GET'
    post_cnt = 0
    get_cnt = 0
    result = {}
    for request in requests:
        upper = request.upper()
        method = upper.split(" ")[1]
        flag = method.find(post)
        if flag > 0:
            post_cnt += 1
            result[post] = post_cnt
            continue

        flag = method.find(get)
        if flag > 0:
            get_cnt += 1
            result[get] = get_cnt

    print(result)


config_data()
statistics_request_type()
